package com.googlecode.classgrep.grep.annotated;

import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.googlecode.classgrep.grep.annotated.internal.FieldGrepInternal;
import com.googlecode.classgrep.info.FieldInfo;

public class FieldGrep implements FieldGrepInternal{

	private final Map<String, List<FieldInfo>> annotated = new HashMap<String, List<FieldInfo>>();
	
	
	public Map<String, List<FieldInfo>> getAnnotatedFieldMap() {
		return annotated;
	}

	
	public List<FieldInfo> findAnnotatedFields(Class<? extends Annotation> annotation) {
		return annotated.get(annotation.getName());
	}

}
